package com.xr.miniprogram.controller.index;

import com.xr.common.core.controller.BaseController;
import com.xr.common.core.domain.AjaxResult;
import com.xr.miniprogram.domain.MiniProgramSwiper;
import com.xr.miniprogram.service.IMiniProgramSwiperService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Api("小程序轮播图控制")
@RestController
@RequestMapping("/miniprogram/swiper")
public class MiniProgramSwiperController extends BaseController{
    @Resource
    private IMiniProgramSwiperService swiperService;

    @ApiOperation("获取轮播图列表")
    @GetMapping("/list")
    public AjaxResult list(){
        List<MiniProgramSwiper> list = swiperService.selectSwiperList(new MiniProgramSwiper());
        return success(list);
    }

}
